package demo.hw;

/**
 * @author taqo
 * @date 2021/5/26
 */
public class _统计每个月兔子的总数 {
    public static void main(String[] args) {
        total(9);
    }

    private static void total(int m) {
        int a = 1, b = 1, c = 0;
        for (int i = 2; i < m; i++) {
            c = a + b;
            a = b;
            b = c;
        }
        System.out.println(c);
    }
}
